#include "pm_device.h"
#include "pm_chip_hal.h"

struct hpm_opp g_cpu_hpm_opp_table[6] = {
    {
        .freq = 594 * _1M,  // 594: default freq
        .vmin = 740000,  // 740000: vmin
        .vmax = 1060000,  // 1060000: vmax
        .hpmrecord = 250,  // 250: default hpmrecord
        .div = 11  // 11: div
    },
    {
        .freq = 792 * _1M,  // 792: default freq
        .vmin = 740000,  // 740000: vmin
        .vmax = 1060000,  // 1060000: vmax
        .hpmrecord = 250,  // 250: default hpmrecord
        .div = 15  // 15: div
    },
    {
        .freq = 930 * _1M,  // 930: default freq
        .vmin = 800000,  // 800000: vmin
        .vmax = 1060000,  // 1060000: vmax
        .hpmrecord = 280,  // 280: default hpmrecord
        .div = 18  // 18: div
    },
    {
        .freq = 1000 * _1M,  // 1000: default freq
        .vmin = 800000,  // 800000: vmin
        .vmax = 1060000,  // 1060000: vmax
        .hpmrecord = 280,  // 280: default hpmrecord
        .div = 19  // 19: div
    },
    {
        .freq = 1150 * _1M,  // 1150: default freq
        .vmin = 870000,  // 800000: vmin
        .vmax = 1060000,  // 1060000: vmax
        .hpmrecord = 310,  // 310: default hpmrecord
        .div = 22  // 22: div
    },
    {
        .freq = 1250 * _1M,  // 1250: default freq
        .vmin = 870000,  // 800000: vmin
        .vmax = 1060000,  // 1060000: vmax
        .hpmrecord = 310,  // 310: default hpmrecord
        .div = 24  // 24: div
    },
};

int hal_cpu_get_avs_policy(void)
{
    return (int)HI_CPU_AVS_POLICY_CLOSE;
}

void hal_cpu_set_hpm_div(unsigned int div)
{
    return ;
}

void hal_cpu_hpm_init(void)
{
    /* cpu HPM reset */
    /* cpu HPM limit*/
    /* set circularly check */
    /* enable */
    return ;
}

int hal_cpu_get_average_hpm(void)
{
    return 0;
}

